<?php

declare(strict_types=1);

namespace App\Command;

use Hyperf\Command\Annotation\Command;
use Hyperf\Command\Command as HyperfCommand;
use Psr\Container\ContainerInterface;

/**
 * @Command
 */
class DemoCommand extends HyperfCommand
{
    /**
     * @var ContainerInterface
     */
    protected $container;
    public $data = [1, 2, 3];

    public function __construct(ContainerInterface $container)
    {
        $this->container = $container;

        parent::__construct('tool:demo');
    }

    public function configure()
    {
        parent::configure();
        $this->setDescription('Hyperf Demo Command');
    }

    public function handle()
    {
        $data2 = $this->data;
        $data = $data2;
        unset($data[0], $data[1]);
        dump($this->data, $data, $data2);
        $this->line('Hello Hyperf!', 'info');
    }
}
